<template>
  <div class="home">
    <div class="banner">
      <!-- 头部tab栏 -->
      <!-- 接收tab组件传递过来的index -->
      <Tabs @sendIndex="getIndex"></Tabs>
    </div>
    <!-- 路由占位符 -->
    <router-view></router-view>
    <!-- 返回顶部 -->
    <el-backtop :bottom="100">
      <i class="iconfont icon-huidingbu"></i>
    </el-backtop>
    <Footer></Footer>
  </div>
</template>
<script>
import userUtils from '@/utils/userUtil'
import Footer from './footer'
import Tabs from './tabs'
export default {
  name: 'Home',
  components: {
    Footer,
    Tabs
  },
  data () {
    return {
      activeIndex: '',
      isLogin: userUtils.isLogin()
    }
  },
  computed: {
  },
  methods: {
    handleSelect (key, keyPath) {
      // console.log(key, keyPath)
    },
    getIndex (e) {
      // console.log(e);
      this.activeIndex = e
    }
  }
}
</script>

<style lang="less" scoped>
.home {
  background-color: #f7f7f7;
}
* {
  border-bottom-color: transparent !important;
}
.el-menu--horizontal > .el-menu-item {
  border-top: 0.125rem solid transparent;
  color: #333333;
  box-sizing: border-box;
}
.el-menu--horizontal > .el-menu-item.is-active {
  border-bottom: 0;
  border-top: 0.125rem solid rgb(255, 83, 66);
  box-sizing: border-box;
}
// .footer[data-v-fae5bece] {
//   margin-bottom: 3.125rem;
// }
body {
  position: relative;
  background-color: #eff1f4;
  margin: 0 auto;
  p {
    margin: 0;
    padding: 0;
  }
  footer {
    position: absolute;
    bottom: 0;
    left: 0;
  }
}

.title {
  font-size: 2.5rem;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #333333;
}

.banner,
.container {
  height: 100%;
  width: 100%;
  margin: auto;
}
header {
  position: absolute;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  height: 3.5rem;
  font-size: 1.125rem !important;
  font-weight: bold;
  z-index: 200;
  .logo {
    flex: 0.7;
    text-align: center;
    line-height: 3.75rem;
  }
  .item {
    font-weight: bold;
    text-decoration: none;
    color: #666;
    padding: 0 1.25rem;
    display: inline-block;
    cursor: pointer;
    box-sizing: border-box;
  }
}
.el-menu {
  background-color: transparent;
  color: #333333;
}
.el-menu-item.is-active {
  background-color: transparent !important;
}
.el-menu-item {
  background-color: rgba(0, 0, 0, 0) !important;
  font-size: 1.125rem;
}
.el-menu.el-menu--horizontal {
  border-bottom: none;
}
.icon-lingdang1 {
  color: #eee;
  line-height: 3.75rem;
}
.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}
.username {
  display: inline-block;
  margin-left: 0.625rem;
  font-weight: bold;
  font-size: 1rem;
  color: #333333;
  width: 6.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/deep/.el-backtop {
  .iconfont {
    font-size: 3.75rem;
    color: #ff5e4e;
  }
}
</style>
